import { ApiProperty } from "@nestjs/swagger";
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
@Entity('photo')
export class Photo{
    
    @ApiProperty()
    @PrimaryGeneratedColumn()
    id: number;

    @ApiProperty()
    @Column({ length: 500 })
    name: string;

    @ApiProperty()
    @Column('text')
    description: string;

    @ApiProperty()
    @Column()
    filename: string;

    @ApiProperty()
    @Column('int')
    views: number;
    
    @ApiProperty()
    @Column()
    isPublished: boolean;
}